﻿/**
 * @author catarina
 */
class SCUMMCore.Util
{
	public static function xAbsoluto( pmc:MovieClip ):Number
	{
		var nX:Number = 0;
		var mcTemp:MovieClip = pmc;
		
		while ( mcTemp != undefined )
		{
			nX += mcTemp._x;
			mcTemp = mcTemp._parent;
		}
		return nX;
	}
	
	public static function yAbsoluto( pmc:MovieClip ):Number
	{
		var nY:Number = 0;
		var mcTemp:MovieClip = pmc;
		
		while ( mcTemp != undefined )
		{
			nY += mcTemp._y;
			mcTemp = mcTemp._parent;
		}
		return nY;
	}
}